/*
 *  Arrow
 *
 *  Created by David Giovannini on 1/5/07.
 *  Copyright 2007 Software by Jove. All rights reserved.
 *
 */
 
#ifndef SBJ_Thread_Stamp_h
#define SBJ_Thread_Stamp_h

#include <string>

namespace SBJ
{

/*
Class: Stamp

Stamp captures time and thread id at its construction.
It provides statc methods to access process specific information.
*/

class Stamp
{
public:
	typedef long long Time;

	struct Version
	{
		Version( void );
		bool debug;
		short file[ 4 ]; // Most significant at pos 4
		short product[ 4 ]; // Most significant at pos 4
	};

	Stamp( void );

	~Stamp( void );

	void reset( void );

	const Time& getTime( void ) const;

	int getThreadId( void ) const;
	
	static int getProcessId( void );

	static const std::string& getProcessName( void );

	static const std::string& getProcessPathName( void );

	static const std::string& getComputerName( void );

	static const Version& getProcessVersion( void );

private:
	Time m_time; // microsec
	int m_threadID;
};

}

#endif